Generally, a power inverter includes a capacitor module for smoothing which receives a direct current power from a direct current power source, an inverter circuit of generating an alternate current power by receiving the direct current power from the capacitor module, and a control circuit for controlling the inverter circuit. The alternate current power is supplied to, for example, a motor, and the motor generates a rotating torque in accordance with the supplied alternate current power. The motor generally has a function as a generator, and when a mechanical energy is supplied from outside to the motor, the motor generates an alternate current power based on the supplied mechanical energy. There is frequently a case where the power inverter also has a function of converting an alternate current power into a direct current power, and an alternate current power generated by the motor is converted into a direct current power. A conversion from the direct current power into the alternate current power or a conversion from the alternate current power into the direct current power is controlled by the control device described above. For example, in a case where the motor is a synchronous electrical motor, a control with regard to the power conversion described above can be carried out by controlling a phase of a rotating magnetic field which is generated by a stator relative to a position of a magnetic pole of a rotor of the synchronous electrical motor. An example of the power inverter is disclosed in Japanese Unexamined Patent Publication No. 2009-219270.
A power inverter is mounted on, for example, a vehicle, receives a direct current power from a secondary battery which is similarly mounted on the vehicle, and generates an alternate current power for supplying to a motor which generates a rotational torque for driving. Also, in a regenerative braking operation, the motor generates an alternate current power based on a driving energy for generating a braking force, and the generated alternate current power is converted into a direct current power by a power inverter, charged in the secondary battery described above, and used again as a power for driving the vehicle or the like.